package com.min.netty;

import com.min.netty.broadcater.LogEventBroadcaster;

import java.io.File;
import java.net.InetSocketAddress;

/**
 * Create By minzhiwei On 2018/9/10 16:34
 * TODO 功能描述
 * @author sirmin
 */
public class Client {
    public static void main(String[] args) throws Exception {
        final LogEventBroadcaster logEventBroadcaster = new LogEventBroadcaster(new InetSocketAddress("192.168.0.255", 9999),
                new File("C:\\Users\\sirmin\\Desktop\\单词\\口诀类型.txt"));
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            System.out.println("aaa");
            try {
                logEventBroadcaster.stop();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }));
        logEventBroadcaster.run();

    }
}
